// flex布局
@mixin flex($direction:row, $x:center, $y:center) {
  display: flex;
  flex-direction: $direction;
  justify-content: $x;
  align-items: $y;
}

// 美化滚动条
@mixin scrollbar {
  &::-webkit-scrollbar {
    /*滚动条整体样式*/
    width: 6px;  /*高宽分别对应横竖滚动条的尺寸*/
    height: 1px;
  }
  &::-webkit-scrollbar-thumb {
    /*滚动条里面深色条*/
    border-radius: 10px;
    box-shadow: inset 0 0 5px rgba(236, 236, 236, 0.1);
    background: #ccc;
  }
  &::-webkit-scrollbar-track {
    /*滚动条里面轨道*/
    box-shadow: inset 0 0 5px rgba(236, 236, 236, 0.1);
    border-radius: 10px;
    background: #ededed;
  }

}

// 文本单行超出省略号
@mixin no-wrap {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

// 文本多行超出省略号
@mixin no-wrap-multi($count: 3) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $count;
  overflow: hidden;
}